<extend name="Public/base"/>
<block name="sidebar">
    <include file="sidemenu"/>
</block>
<block name="body">
    <div class="main-title">
        <h2>友情链接管理</h2>
    </div>

    <div class="cf">
        <a class="btn" href="{:U('add')}">新 增</a>
        <!--<a class="btn" href="javascript:;">删 除</a>-->
        <!--<button class="btn list_sort" url="{:U('sort',array('pid'=>I('get.pid',0)),'')}">排序</button>-->
    </div>

    <div class="data-table table-striped">
        <table>
            <thead>
            <tr>
                <th class="row-selected">
                    <input class="checkbox check-all" type="checkbox">
                </th>
                <th>ID</th>
                <th>链接名称</th>
                <th>链接地址</th>
                <th>链接状态</th>
                <th>创建时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <notempty name="link">
                <volist name="link" id="link">
                    <tr>
                        <td><input class="ids row-selected" type="checkbox" name="" id="" value="{$link['id']}"> </td>
                        <td>{$link.id}</td>
                        <td><a href="{:U('edit?id='.$link['id'])}">{$link.title}</a></td>
                        <td>{$link.url}</td>
                        <td> <eq name="link.status" value="1">
                            启用
                            <else/>
                            禁用
                        </eq></td>
                        <td>{$link.create_time|date="y-m-d h:i:s",###}</td>
                        <td>
                            <a title="编辑" href="{:U('edit?id='.$link['id'])}">编辑</a>
                            <eq name="vo.show" value="1">
                                <a href="{:U('active',array('id'=>$link['id'],'status'=>0))}" class="confirm ajax-get">禁用</a>
                                <else/>
                                <a href="{:U('active',array('id'=>$link['id'],'status'=>1))}" class="confirm ajax-get">启用</a>
                            </eq>
                            <a class="confirm ajax-get" title="删除" href="{:U('del?id='.$link['id'])}">删除</a>
                        </td>
                    </tr>
                </volist>
                <else/>
                <td colspan="6" class="text-center"> aOh! 暂时还没有内容! </td>
            </notempty>
            </tbody>
        </table>
    </div>
    <!-- 分页 -->
    <div class="page">
        {$page}
    </div>
    </div>

</block>